layui.use(['form', 'layer', 'dropdown'], function () {
    const form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery,
        dropdown = layui.dropdown;

    //左侧菜单点击事件，其中 docDemoMenu1 对应的是菜单结构上的 id 指
    dropdown.on('click(docDemoMenu1)', function (options) {
        var othis = $(this); //当前菜单列表的 DOM 对象
        console.log(options); //菜单列表的 lay-options 中的参数
        switch (options.id) {
            case 1:
                window.location.href = "tool01.html";
                break;
            case 2:
                window.location.href = "tool02.html";
                break;
            case 3:
                window.location.href = "tool03.html";
                break;
            case 4:
                window.location.href = "tool04.html";
                break;
            case 5:
                window.location.href = "tool05.html";
                break;
        }
    });
});
